Skip to content

crashinfo: Create core.txt.last symlink#2199

Closed
ricardobranco777 wants to merge 1 commit into
freebsd:mainfrom
ricardobranco777:crashinfo_coretxt_symlink
Closed

crashinfo: Create core.txt.last symlink#2199
ricardobranco777 wants to merge 1 commit into
freebsd:mainfrom
ricardobranco777:crashinfo_coretxt_symlink

Conversation

@ricardobranco777

Copy link
Copy Markdown
Contributor

When saving a coredump, savecore(8) maintains .last symlinks for the info and vmcore artifacts, but not for the crashinfo text report.

Create it here to point at the current core.txt. file.

This makes /var/crash/core.txt.last track the same core dump as info.last and vmcore.last.

Supersedes: #2178

When saving a coredump, savecore(8) maintains .last symlinks for the
info and vmcore artifacts, but not for the crashinfo text report.

Create it here to point at the current core.txt.<bounds> file.

This makes /var/crash/core.txt.last track the same core dump as
info.last and vmcore.last.

Signed-off-by: Ricardo Branco <rbranco@suse.de>

@mhorne mhorne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you.

@mhorne mhorne added the merged Closed commit that's been merged label May 28, 2026
@mhorne mhorne closed this May 28, 2026
freebsd-git pushed a commit that referenced this pull request May 28, 2026
When saving a coredump, savecore(8) maintains .last symlinks for the
info and vmcore artifacts, but not for the crashinfo text report.

Make crashinfo(8) create the link, pointing at the current
core.txt.<bounds> file.

This makes /var/crash/core.txt.last track the same core dump as
info.last and vmcore.last.

[mhorne: I tweaked the submission, such that the link will be created as
soon as the core.txt.X file is generated; not only after a successful
report has been written.]

Signed-off-by:	Ricardo Branco <rbranco@suse.de>
Reviewed by:	mhorne
MFC after:	1 week
Pull Request:	#2199
@mhorne

mhorne commented May 28, 2026

Copy link
Copy Markdown
Contributor

I tested the script and made two small tweaks:

  • Move link creation earlier, so that it is not dependent on the success of the kgdb commands (which can fail)
  • remove basename, it did not seem to be needed.

Please see the commit and let me know if there was a problem. I wanted to avoid an extra feedback cycle, so I just proceeded.

Thanks again.

@ricardobranco777 ricardobranco777 deleted the crashinfo_coretxt_symlink branch May 29, 2026 18:57
@ricardobranco777

Copy link
Copy Markdown
Contributor Author

I tested the script and made two small tweaks:

  • Move link creation earlier, so that it is not dependent on the success of the kgdb commands (which can fail)
  • remove basename, it did not seem to be needed.

Please see the commit and let me know if there was a problem. I wanted to avoid an extra feedback cycle, so I just proceeded.

Thanks again.

I've just tested it and it works. The resulting symlink is relative like the others so the basename was indeed redundant.

Thanks for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged Closed commit that's been merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants